frame: Properly initialize clip
authorTimm Bäder <mail@baedert.org>
Fri, 28 Apr 2017 09:26:25 +0000 (11:26 +0200)
committerTimm Bäder <mail@baedert.org>
Fri, 28 Apr 2017 09:27:09 +0000 (11:27 +0200)
GtkCssGadget initializes the content clip to {0, 0, 0, 0}, so we can't
just union the child clip with it.

gtk/gtkframe.c

index fc4381c9f055bd642d7777b1c4fac325401a2c35..05b603d5d12efe0e32795fbaa03c9492a005b83a 100644 (file)
@@ -688,7 +688,7 @@ static void
 gtk_frame_size_allocate (GtkWidget     *widget,
                         GtkAllocation *allocation)
 {
-  GtkAllocation clip = *allocation;
+  GtkAllocation clip;
 
   gtk_widget_set_allocation (widget, allocation);
 
@@ -721,6 +721,8 @@ gtk_frame_allocate (GtkCssGadget        *gadget,
   gtk_frame_compute_child_allocation (frame, &new_allocation);
   priv->child_allocation = new_allocation;
 
+  *out_clip = *allocation;
+
   if (priv->label_widget &&
       gtk_widget_get_visible (priv->label_widget))
     {